package com.mike.layoutdemo415lbx;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{
    private Button Frame,Linear,Constrain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Frame = findViewById(R.id.frameActivity);
        Linear = findViewById(R.id.btn_linearActivity);
        Constrain = findViewById(R.id.ConstrainActivity);
        Frame.setOnClickListener(this);
        Linear.setOnClickListener(this);
        Constrain.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        if(id == R.id.frameActivity){
            Intent intent = new Intent(this, FrameActivity.class);
            startActivity(intent);
        }
        if(id == R.id.ConstrainActivity){
            Intent intent = new Intent(this, ConstrainActivity.class);
            startActivity(intent);
        }
        if(id == R.id.btn_linearActivity){
            Intent intent = new Intent(this, LinearActivity.class);
            startActivity(intent);
        }
    }
}